<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="lfn" uri="http://tags.lorizz.com/functions"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<title>XXX | Images</title>
</head>
<body>
	<jsp:include page="jsp/header.jsp"/>
	<c:choose>
		<c:when test="${not empty images}">
			<c:forEach items="${images}" var="image">
				<div style="width:155px;float:left">
					<div>
						<c:set var="found" value="false"/>
						<c:forEach items="${image.imageVariants}" var="imageVariant">
							<c:if test="${imageVariant.name == 'thumbnail.middle'}">
								<a href="/i/${image.id}"><img src="${lfn:externalize(imageVariant.uri)}"/></a>
								<c:set var="found" value="true"/>
							</c:if>
						</c:forEach>
						<c:if test="${not found}">
							<img src="/resources/processing.thumbnail.middle.jpg"/>
						</c:if>
					</div>
					<div>${image.filename}</div>
				</div>
			</c:forEach>
		</c:when>
		<c:otherwise>
			No images.
		</c:otherwise>
	</c:choose>
</body>
</html>